<?php
/**
 * Created by PhpStorm.
 * User: songs
 * Date: 2019/10/20
 * Time: 17:44
 */
use App\Models\Admin\OrderTempModel;
use App\admin\Service\OA;
use App\Models\Admin\OrderBaleModel;
use App\Models\User\UserModel;
use App\Jobs\Fun;
use App\Models\CompanysModel;
use App\Models\User\UserOrdersModel;
use App\Models\Admin\OrderCheckModel;

$out_trade_no = $_GET['out_trade_no'] ?? '';
if ($out_trade_no == '') {
    Fun::showmsg("参数错误");
}
$orderTempModel = OrderTempModel::where(['out_trade_no' => $out_trade_no])->first();
if (!$orderTempModel) {
    Fun::showmsg("订单不存在");
}
$out_trade_no = $orderTempModel->out_trade_no;
$uid = OA::$user->getId();
$type = null; ///gs表示公司  gc 表示工厂
if ($orderTempModel->cid == $uid) {
    $type = 'gs';    ///表示公司
} elseif ($orderTempModel->fid == $uid) {
    $type = 'gc';    ///表示工厂
} else {
    Fun::showmsg("您无权限操作表单");
}

?>
@extends("h5.layouts.main")
@section('content')
    <link rel="stylesheet" type="text/css" href="/h5/css/my.css">
    <link rel="stylesheet" type="text/css" href="../datepicker/jquery-ui.min.css">
    <link rel="stylesheet" type="text/css" href="../css/app.css">
    <link rel="stylesheet" type="text/css" href="../css/orderGrad.css">
    <script src="http://g.tbcdn.cn/mtb/lib-flexible/0.3.4/??flexible_css.js,flexible.js"></script>
    <input id="out_trade_no" value="<?= $orderTempModel->out_trade_no ?>" type="hidden"/>
    <input id="type" value="<?= $type ?>" type="hidden"/>
    <!-- 我的订单（抢单和订单） -->
    <div class="shippingTransportation orderProductionDocumentary ">
        <div class="orderParamTitle">
        <span>发货运输 (<?php
            if ($type == 'gs') {
                echo "公司";
            } else {
                echo "工厂";
            }
            ?>)</span>
            <a onclick="MC.back()" class="back"> <img src="../images/return.png" class="orderRtns"/></a>
        </div>
        <div style="height:1.066667rem"></div>
        <div class="content">
            <div class="address">
                <div class="ad1">
                    <div>出发地</div>
                    <div>杭州</div>
                </div>
                <div class="img"><img src="../images/order/jiantou.png" alt=""></div>
                <div class="ad2">
                    <div>目的地</div>
                    <div>上海</div>
                </div>
            </div>
            <div class="orderCotent">
                <p>订单详情</p>
                <ul>
                    <li>
                        <div>中单企业</div>
                        <div></div>
                    </li>
                    <li>
                        <div>企业地址</div>
                        <div></div>
                    </li>
                    <li>
                        <div>负责人</div>
                        <div></div>
                    </li>
                    <li>
                        <div>联系方式</div>
                        <div></div>
                    </li>
                    <li>
                        <div>订单数量</div>
                        <div></div>
                    </li>
                    <li>
                        <div>订单金额</div>
                        <div></div>
                    </li>
                    <li>
                        <div>订单总价</div>
                        <div></div>
                    </li>
                    <li>
                        <div>厂家备注</div>
                        <div></div>
                    </li>
                    <li>
                        <div>下单时间</div>
                        <div></div>
                    </li>
                    <li>
                        <div>快递运单</div>
                        <div></div>
                    </li>
                    <li>
                        <div>快递类型</div>
                        <div></div>
                    </li>
                    <li>
                        <div>生产进度</div>
                        <div></div>
                    </li>
                </ul>
            </div>
            <div class="orderDown">
                <div onclick="changeOrder(pageId,7)">确认收货</div>
            </div>
        </div>


    </div>




    <script>
        //  new MC.Order.comCheck();

    </script>
@stop